package com.aabte.permissionframeworklearn.permission.mapper;

import com.aabte.permissionframeworklearn.permission.beans.PageQuery;
import com.aabte.permissionframeworklearn.permission.model.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    SysUser findByKeyword(String keyword);

    int countByMail(@Param("mail") String mail, @Param("id") Long id);

    int countByTelephone(@Param("telephone") String telephone, @Param("id") Long id);

    int countByUserName(String username);

    long countByDeptId(@Param("deptId") Long deptId);

    List<SysUser> getPageByDeptId(@Param("deptId") Long deptId, @Param("page") PageQuery pageQuery);

    List<SysUser> getByIdList(@Param("userIdList") List<Long> userIdList);

    List<SysUser> getAll();

}